//
//  MCUIToolkit.h
//  MClient
//
//  Created by Zhouyi on 10-8-31.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>


@interface MCUIToolkit : NSObject {

}

+ (NSMutableDictionary *)getField:(NSMutableDictionary *)appItem;

+ (NSString *)getFieldName:(NSMutableDictionary *)appItem;

+ (NSString *)getFieldType:(NSMutableDictionary *)appItem;

+ (NSString *)getFieldLabel:(NSMutableDictionary *)appItem;

+ (NSString *)getRelationObject:(NSMutableDictionary *)appItem;

+ (NSMutableDictionary *)splitSelectItems2Dictionary:(NSMutableDictionary *)selectOption;

+ (NSString *)replaceMultItemLable:(NSString *)aString selectItems:(NSMutableDictionary *)selectItems;

+ (NSMutableDictionary *)getselectOption:(NSMutableDictionary *)appItem
							selectOption:(NSMutableDictionary *)so
							   fieldName:(NSString *)fieldName;

+ (NSMutableDictionary *)getselectItems:(NSMutableDictionary *)appItem
						   selectOption:(NSMutableDictionary *)so
							  fieldName:(NSString *)fieldName;

+ (NSString *)convertValue:(NSMutableDictionary *)appItem
				 fieldData:(NSMutableDictionary *)fieldData
			  selectOption:(NSMutableDictionary *)so;

+ (NSString *)getFieldTextValue:(NSMutableDictionary *)record
						appItem:(NSMutableDictionary *)appItem
				   selectOption:(NSMutableDictionary *)so;

+ (NSMutableDictionary *)getFieldTextStyle:(NSMutableDictionary *)record
								   appItem:(NSMutableDictionary *)appItem; 

+ (NSMutableArray *)getButtons:(NSMutableArray *)dataButtons
					cfgButtons:(NSMutableArray *)cfgButtons;

+ (NSMutableArray *)getWithFormButtons:(NSMutableArray *)originalButtons;

+ (int)getWithFormButtonsBarHeight:(NSMutableArray *)withFormButtons
						 buttonCol:(int)buttonCol;

+ (UIToolbar *)getPageBar:(bool)hasQueryField delegate:(id)aDelegate;

+ (NSMutableArray *)getAListInfo:(NSMutableDictionary *)listlayout
						listData:(NSMutableArray *)listData
						rowIndex:(int)rowIndex
					   cellWidth:(float)cellWidth;

+ (UITableViewCell *)getAListCell:(NSMutableArray *)aListInfo
					  imagesCache:(NSMutableDictionary *)imagesCache
						 rowIndex:(int)rowIndex
					isMultiSelect:(bool)isMultiSelect
						cellWidth:(float)cellWidth
					   cellHeight:(float)cellHeight
					   imageWidth:(float)imageWidth
					  imageHeight:(float)imageHeight;

+ (bool) hasQueryField:(NSMutableDictionary *)listLayout;

+ (int)getFieldLength:(NSMutableDictionary *)appItem;
	
+ (id)getObjectCopy:(id)object;

+ (UIImage*)copyScreen;

+ (CGFloat)getMaxWidth:(NSArray*)listDatas  withAppItems:(NSMutableDictionary*)appItem;

+ (NSString*)getChineseSpell:(NSString*) chinese;

+ (UIActionSheet*)actionSheet:(NSMutableArray*)buttons 
					  withTag:(int)tag 
				 withDelegate:delegate
					withTitle:title;
@end
